package com.lieve.bpm.controller;

import com.lieve.bpm.dto.RequestDto;
import com.lieve.bpm.entity.UserBean;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author sunyoboy
 * 2020/9/29
 */
@RestController
@RequestMapping("/flow")
public class FlowController {
    @Resource
    private UserBean userBean;

    @GetMapping("/start")
    public void start() {
        userBean.hello();
    }

    @PostMapping("/complete")
    public void complete(@RequestBody RequestDto requestDto) {
        userBean.complete(requestDto.getTaskId());
    }
}
